<!DOCTYPE html>
<html style="background-color: #F3F3F4">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>记工账本</title>
</head>
<body>


<table>
    <tr>
        <th width="100px">姓名</th>
        <th><?php echo $info->name?></th>
    </tr>
    <tbody>
    <tr>
        <td>
            日薪
        </td>
        <td>
            <?php echo $info->salary?>
        </td>
    </tr>
    <tr>
        <td>
            电话
        </td>
        <td>
            <?php echo $info->tel?>
        </td>
    </tr>
    <tr>
        <td>
            备注
        </td>
        <td>
            <?php echo $info->remark?>
        </td>
    </tr>
    </tbody>
</table>


<div>
    出勤
</div>
    <table>
        <tr>
            <th>账本</th>
            <th>日期</th>
            <th>工时</th>
            <th>加班</th>
            <th>薪酬</th>
            <th>加班</th>
        </tr>
        <tbody>
<?php
        foreach ($work as $val) {
?>
            <tr>
                <td>
                    <?php echo $val->name?>
                </td>
                <td>
                    <?php echo $val->date?>
                </td>
                <td>
                    <?php echo $val->attendance_days?>
                </td>
                <td>
                    <?php echo $val->a_d?>
                </td>
                <td>
                    <?php echo $val->attendance_salary?>
                </td>
                <td>
                    <?php echo $val->a_s?>
                </td>
            </tr>
<?php
        }
?>
        </tbody>
    </table>
</div>




<div>
    结款
</div>
<div >
    <table>
        <thead>
        <tr>
            <th>日期</th>
            <th>结款金额</th>
        </tr>
        </thead>
        <tbody>
<?php
        foreach ($payment as $val) {
?>
        <tr>
            <td>
                <?php echo $val->date?>
            </td>
            <td>
                <?php echo $val->amount?>
            </td>
        </tr>
<?php
        }
?>
        </tbody>
    </table>

    <table>
        <tr>
            <th>总薪酬</th>
            <th>已结款:</th>
            <th>未结款</th>
        </tr>
        <tbody>
        <tr>
            <td>
                <?php echo $attendance_salary->attendance_salary?>
            </td>
            <td>
                <?php echo $payment_all->amount?>
            </td>
            <td>
                <?php echo $attendance_salary->attendance_salary - $payment_all->amount?>
            </td>
        </tr>
        </tbody>
    </table>
</div>          
</body>
</html>
